<?php session_start();
/**
* @package		Parents@School.
* @copyright	Copyright (C) 2008 Kristof Beckers. All rights reserved.
* @Version		1.0
* @license		GNU/GPL, see LICENSE.php
**/
?>

<head>
<link rel="stylesheet" href="../../css/template_css.css" type="text/css"/> 
</head>
<?php 
include ("../../include/config.php");
require_once ("../../include/db.php");
include ("../../include/header.php");

if(isset($_SESSION['myusername'])){
	if ($_SESSION['admin'] == "$adminid") {
?>

<body>
<div align="center"><img src="<?php echo "../$logo" ; ?>" /><br><br />
<a href="../index.php"/><img src="<?php echo "../$home" ; ?>" border="0"/></a><br /><br />

<?php
$datum = $_POST['datum'];


if ($datum == ""){

echo "Waarom een datum toevoegen als je geen datum ingeeft? <br><br>
		<a href='date.php'/>Ga terug</a>";
		}
else{

$query = "INSERT INTO $tbdate ( date )

VALUES ( '$datum' )";

echo "<br><br>
		De datum is toegevoegd aan de database.<br><br>
		<a href='index.php'>Ga verder</a>";

mysql_query($query) or die(mysql_error());


mysql_close($conn);
}}}
else {
header("location:index.php");
}
?>
</div>

</body>
